using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

namespace Qreed.Windows.ComponentModel
{
    public class PropertyBagExpandableConverter : ExpandableObjectConverter
    {
        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
        {
            return true;
            //return base.CanConvertTo(context, destinationType);
        }

        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            /*if (destinationType == typeof(string))
            {
                return "Gedoe!!!";
            }*/

            return base.ConvertTo(context, culture, value, destinationType);
        }

        public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
        {
            return base.GetProperties(context, value, attributes);
        }
    }
}
